﻿using System.Linq;
using FacialClub.Models.Entities;

namespace FacialClub.Models.Interfaces
{
    /// <summary>
    /// Email Template Repository Interface
    /// </summary>
    public interface IEmailTemplateRepository
    {
        /// <summary>
        /// Get All Email Templates
        /// </summary>
        /// <returns></returns>
        IQueryable<EmailTemplate> FindAllEmailTemplate();

        /// <summary>
        /// Get Template By Name
        /// </summary>
        /// <param name="q"></param>
        /// <returns></returns>
        IQueryable<EmailTemplate> FindEmailTemplateByName(string q);

        /// <summary>
        /// Get Template By Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        EmailTemplate GetEmailTemplate(int id);

        /// <summary>
        /// Add Email Template in the Database
        /// </summary>
        /// <param name="emailTemplate"></param>
        void Add(EmailTemplate emailTemplate);

        /// <summary>
        /// Delete Email Template from the Database
        /// </summary>
        /// <param name="emailTemplate"></param>
        void Delete(EmailTemplate emailTemplate);

        /// <summary>
        /// Save record in the database
        /// </summary>
        void Save();
    }
}